#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "NamedElement.h"
#include "RedefinableElement.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class Classifier;

/// <summary>
/// Feature
/// A Feature declares a behavioral or structural characteristic of Classifiers.
/// </summary>
class UMLMODEL_EXPORT Feature : public NamedElement, public RedefinableElement {

public: // Constructors and destructors
    explicit Feature(const QString& umlType="uml::Feature");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// featuringClassifier getter
    /// The Classifiers that have this Feature as a feature.
    /// </summary>
    shared_ptr<Classifier> featuringClassifier() const;

    /// <summary>
    /// featuringClassifier setter
    /// The Classifiers that have this Feature as a feature.
    /// </summary>
    void setFeaturingClassifier(shared_ptr<Classifier> value);

    /// <summary>
    /// isStatic getter
    /// Specifies whether this Feature characterizes individual instances classified by
    /// the Classifier (false) or the Classifier itself (true).
    /// </summary>
    bool isStatic() const;

    /// <summary>
    /// isStatic setter
    /// Specifies whether this Feature characterizes individual instances classified by
    /// the Classifier (false) or the Classifier itself (true).
    /// </summary>
    void setIsStatic(bool value);

private: // Fields
    /// <summary>
    /// featuringClassifier
    /// The Classifiers that have this Feature as a feature.
    /// </summary>
    shared_ptr<Classifier> featuringClassifier_;

    /// <summary>
    /// isStatic
    /// Specifies whether this Feature characterizes individual instances classified by
    /// the Classifier (false) or the Classifier itself (true).
    /// </summary>
    const static bool isStatic_default_;
    bool isStatic_= isStatic_default_;

};

} // namespace uml
